package com.ant.storage.controller;


import com.ant.storage.common.ResultPage;
import com.ant.storage.dto.PersonnelDto;
import com.ant.storage.service.IPersonnelService;
import com.ant.storage.vo.PersonnelVo;
import com.ant.storage.vo.PurchaseVo;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 人事管理 前端控制器
 * </p>
 *
 * @author hzd
 * @since 2023-03-20
 */
@RestController
@RequestMapping("/personnel")
public class PersonnelController {



    @Autowired
    private IPersonnelService personnelService;

    @ApiOperation(value = "获取领料数据列表")
    @GetMapping("/getPersonnelList")
    public ResultPage getPersonnelList(PersonnelDto dto) throws Exception {
        PageInfo<PersonnelVo> personnelList = personnelService.getPersonnelList(dto);
        return ResultPage.success("获取成功",personnelList);
    }

    @ApiOperation(value = "获取钉钉审核人")
    @GetMapping("/findNailReview")
    public ResultPage findNailReview(PersonnelDto dto) {
        PageInfo<PurchaseVo> personnelList = personnelService.findNailReview(dto);
        return ResultPage.success("获取成功",personnelList);
    }
}
